package com.shopping.Service.ServiceImpl;

import com.shopping.Entity.UserInfo;
import com.shopping.Service.UserInfoService;
import com.shopping.repository.UserInfoRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class UserInfoServiceImpl implements UserInfoService {
    private final UserInfoRepository userInfoRepository;


    @Override
    public UserInfo getUserByid(int id) {
        return userInfoRepository.findById(id);
    }

    @Override
    public UserInfo updateUserInfo(UserInfo userInfo) {
        return userInfoRepository.save(userInfo);
    }

}
